'use strict';

(function () {
    var appConfig = {};
    window.appConfig = appConfig;
    //服务根目录
    appConfig.serverRootUrl = 'http://api.adaihuo.com';
})();;'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

(function (window, document) {
    var docEl = document.documentElement;
    var dpr = window.devicePixelRatio || 1;

    // adjust body font size
    function setBodyFontSize() {
        if (document.body) {
            document.body.style.fontSize = 12 * dpr + 'px';
        } else {
            document.addEventListener('DOMContentLoaded', setBodyFontSize);
        }
    }
    setBodyFontSize();

    // set 1rem = viewWidth / 7.5
    function setRemUnit() {
        var rem = docEl.clientWidth / 7.5;
        docEl.style.fontSize = rem + 'px';
    }

    setRemUnit();

    // reset rem unit on page resize
    window.addEventListener('resize', setRemUnit);
    window.addEventListener('pageshow', function (e) {
        if (e.persisted) {
            setRemUnit();
        }
    });

    // detect 0.5px supports
    if (dpr >= 2) {
        var fakeBody = document.createElement('body');
        var testElement = document.createElement('div');
        testElement.style.border = '.5px solid transparent';
        fakeBody.appendChild(testElement);
        docEl.appendChild(fakeBody);
        if (testElement.offsetHeight === 1) {
            docEl.classList.add('hairlines');
        }
        docEl.removeChild(fakeBody);
    }
})(window, document);
(function () {
    var Bc = function () {
        function Bc() {
            _classCallCheck(this, Bc);
        }

        _createClass(Bc, [{
            key: 'getUrl',
            value: function getUrl(url) {
                if (url[0] !== '/') url = '/' + url;
                return appConfig.serverRootUrl + url;
            }
        }, {
            key: 'get',
            value: function get(option) {
                var _this = this;

                return new Promise(function (resolve, reject) {
                    $.ajax({
                        type: 'GET',
                        url: _this.getUrl(option.url),
                        data: option.data,
                        success: function success(data, ts, xhr) {
                            resolve(data);
                        },
                        error: function error(xhr, ts, _error) {
                            reject(_error);
                        }
                    });
                });
            }
        }, {
            key: 'post',
            value: function post(option) {
                var _this2 = this;

                return new Promise(function (resolve, reject) {
                    $.ajax({
                        type: 'POST',
                        url: _this2.getUrl(option.url),
                        data: option.data,
                        success: function success(data, ts, xhr) {
                            resolve(data);
                        },
                        error: function error(xhr, ts, _error2) {
                            reject(_error2);
                        }
                    });
                });
            }
        }, {
            key: 'put',
            value: function put(option) {
                var _this3 = this;

                return new Promise(function (resolve, reject) {
                    $.ajax({
                        type: 'PUT',
                        url: _this3.getUrl(option.url),
                        data: option.data,
                        success: function success(data, ts, xhr) {
                            resolve(data);
                        },
                        error: function error(xhr, ts, _error3) {
                            reject(_error3);
                        }
                    });
                });
            }
        }, {
            key: 'delete',
            value: function _delete(option) {
                var _this4 = this;

                return new Promise(function (resolve, reject) {
                    $.ajax({
                        type: 'DELETE',
                        url: _this4.getUrl(option.url),
                        data: option.data,
                        success: function success(data, ts, xhr) {
                            resolve(data);
                        },
                        error: function error(xhr, ts, _error4) {
                            reject(_error4);
                        }
                    });
                });
            }
        }, {
            key: 'copy',
            value: function copy(obj) {
                var newObj = obj instanceof Array ? [] : {};
                for (var i in obj) {
                    newObj[i] = _typeof(obj[i]) == 'object' ? this.copy(obj[i]) : obj[i];
                }
                return newObj;
            }
        }, {
            key: 'checkPage',
            value: function checkPage(pageName) {
                var currentPageName = '';
                if (window.location.pathname == '/') {
                    currentPageName = 'index';
                } else {
                    var arr = window.location.pathname.split('/');
                    currentPageName = arr[arr.length - 1].replace('.html', '');
                }
                return currentPageName === pageName;
            }
        }, {
            key: 'isMobile',
            value: function isMobile() {
                var html = document.documentElement;
                return html.clientWidth < 768.1;
            }
        }]);

        return Bc;
    }();

    window.bc = new Bc();
})();;'use strict';

(function () {
   if (bc.checkPage('about')) {}
})();;'use strict';

(function () {
    if (bc.checkPage('case')) {
        $('.case-select').click(function () {
            var index = $(this).index();
            $('.case-select').removeClass('active').eq(index).addClass('active');
            $('.caselist').css('display', 'none').eq(index).css('display', 'block');
        });
    }
})();;"use strict";;"use strict";

(function () {
    $(".phone-nav").click(function () {
        $(".nav-list").slideToggle(200);
    });
    var div = "<div class=\"connect\">\n    <div class=\"bg\"><img src=\"assets/service.png\" alt=\"\u5BA2\u670D\"></div>\n    <div class=\"bg\"><img src=\"assets/QQ.png\" alt=\"QQ\"></div>\n    <div class=\"bg\"><img src=\"assets/phone.png\" alt=\"\u7535\u8BDD\"></div>\n    <div class=\"bg\"><img src=\"assets/feedback.png\" alt=\"\u53CD\u9988\"></div>    \n</div>";
    $('body').append(div);
    if (bc.checkPage('index')) {
        //检查页面是否是index，是则执行以下代码
        $(window).scroll(function () {
            var rootFontSize = document.documentElement.style.fontSize;
            rootFontSize = rootFontSize.replace('px', '') - 0;
            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;

            if (scrollTop > 1.5 * rootFontSize) {
                $(".product-service_show").addClass("fadeInUp");
            }
            if (scrollTop > 3.8 * rootFontSize) {
                $(".content-left-top").addClass("fadeInUp");
            }
            if (scrollTop > 4.5 * rootFontSize) {
                $(".content-left-b-left").addClass("bounceInLeft");
                $(".content-left-b-right").addClass("bounceInRight");
                $(".case-content-right").addClass("fadeInUp");
            }
        });
    }
})();;'use strict';

(function () {
    $('.service1').hover(function () {
        $('.serviceimg1').addClass('swing animated');
    }, function () {
        $('.serviceimg1').removeClass('swing animated');
    });
    $('.service2').hover(function () {
        $('.serviceimg2').addClass('swing animated');
    }, function () {
        $('.serviceimg2').removeClass('swing animated');
    });
    $('.service3').hover(function () {
        $('.serviceimg3').addClass('swing animated');
    }, function () {
        $('.serviceimg3').removeClass('swing animated');
    });
    $('.service4').hover(function () {
        $('.serviceimg4').addClass('swing animated');
    }, function () {
        $('.serviceimg4').removeClass('swing animated');
    });
    $('.service5').hover(function () {
        $('.serviceimg5').addClass('swing animated');
    }, function () {
        $('.serviceimg5').removeClass('swing animated');
    });
    $('.service6').hover(function () {
        $('.serviceimg6').addClass('swing animated');
    }, function () {
        $('.serviceimg6').removeClass('swing animated');
    });
    $('.service7').hover(function () {
        $('.serviceimg7').addClass('swing animated');
    }, function () {
        $('.serviceimg7').removeClass('swing animated');
    });
    $('.service8').hover(function () {
        $('.serviceimg8').addClass('swing animated');
    }, function () {
        $('.serviceimg8').removeClass('swing animated');
    });
})();;"use strict";

(function () {})();;"use strict";

(function () {})();;'use strict';

(function () {
    var appConfig = {};
    window.appConfig = appConfig;
    //服务根目录
    appConfig.serverRootUrl = 'http://api.adaihuo.com';
})();